<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/share/taglib.jsp" %>
<%  String path = request.getContextPath(); %>
<html>
<head>
<title>重庆模拟志愿填报系统</title>
 <script type="text/javascript" src="<%=path%>/script/jquery-1.3.2.min.js"></script>
<link href="<%=path%>/style/imitation.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">

//写cookies函数
function SetCookie(name,value)//两个参数，一个是cookie的名子，一个是值
{
    var Days = 30; //此 cookie 将被保存 30 天
    var exp  = new Date();    //new Date("December 31, 9998");
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function getCookie(name)//取cookies函数        
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
     if(arr != null) return unescape(arr[2]); return null;

}
function delCookie(name)//删除cookie
{
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookie(name);
    if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}
</script>
<script type="text/javascript">

function exam_login()
{
	/*
	if(document.getElementById("username").value == "" || document.getElementById("password").value == "" )
	{
		alert("请输入用户名和密码");
		return false;
	}
	if($("#checkcode").val() == ""){
		alert("请输入验证码");
		return false;
	}
	*/
	return false;
	if(confirm("点击确定使用服务，意味着您同意我们的免责申明"))
	{
		SetCookie ("username", document.getElementById("username").value);
		//alert(getCookie('username'));
		//window.location="<%=path%>/logon/logon.action";
		//document.getElementById("logon").submit();
		//document.forms[0].submit();
	}
	else
	{
		alert("要使用我们的服务，需同意我们的免责申明");
		return false;
	}
}
</script>
</head>
<body leftmargin=0 bgcolor=#ffffff marginwidth="0" onload="window.document.forms[0].loginusername.focus();" >
<center>
	<jsp:include page="/head.jsp"/>
   <s:form action="logon" namespace="/logon" method="post" id="logon" onsubmit="">
  <table border=0 cellspacing=0 cellpadding=0 width=950 bgcolor=#b1de9b>
    <tbody>
      <tr align=middle>
        <td height=38 colspan=5><img 
      src="<%=path%>/images/U1151P352T1D103007F11DT20071009165800.gif" height=24></td>
      </tr>
      <tr>
        <td width=8></td>
        <td 
    background=<%=path%>/images/u1151p352t1d34927f18dt20060419172557.gif 
    width=403 align=middle><table border=0 cellspacing=0 cellpadding=0 width="80%">
            <input id=url 
        value=http://exam.edu.sina.com.cn/zhiyuan/sinalogin.php?action=result&amp;bkurl=http://exam.edu.sina.com.cn/zhiyuan/zhiyuan.php 
        type=hidden name=url>
            <input value=1 type=hidden name=gateway>
            <% Object us = (Object)request.getSession().getAttribute("frontuser");
			if(us == null){
			%>
            <tbody>
            	<tr align=middle><td><c:out value="${message}" escapeXml="false"/></td></tr>
              <tr align=middle>
                <td height=35 colspan=3><b 
            style="COLOR: #274402; FONT-SIZE: 14px">用户登录</b></td>
              </tr>
              
              <tr>
                <td height=30><font color=#274402>用户名：</font> </td>
                <td><input id=username class=in size=18 name=loginusername value="" tabIndex="1"></td>
                <td height=30><img align=absmiddle src="" width=3 height=5 > <a 
            style="TEXT-DECORATION: underline" class=a04 
            href="<%=path%>/logon/userreg_findPassUI.action"  >忘记密码</a></td>
              </tr>
              <tr>
                <td height=30><font color=#274402>密　码：</font> </td>
                <td height=30><input id=password class=in size=18 type=password name=loinpassword tabIndex="2"></td>
                <td height=30><img align=absmiddle 
            src="<%=path%>/images/志愿模拟填报\" width=3 height=5> <a 
            style="TEXT-DECORATION: underline" class=a04 
            href="<%=path%>/logon/userreg_addUI.action" >注册新用户 </a></td>
              </tr>
              
              <tr>
              	<td height=30><font color=#274402>验证码：</font> </td>
              	<td height=30><input name="checkcode" maxlength="5" id="checkcode" size=10 class=in type="text"  value="" tabIndex="3"/></td>		
				<td height=30><img src="<%=path%>/logon/rand.action" id="createcheckcode" /><a href="javascript:newverifypic();" title="看不清左边的字符">看不清?</a></td>
              </tr>
              <!--  
              <tr>
                <td width="19%">&nbsp;</td>
                <td width="46%"><input name="radiobutton" type="radio" value="radiobutton" />
                  <font color="#274402">同意免责申明</font></td>
                <td height=35 width="35%">&nbsp;</td>
              </tr>
              -->
              <tr>
                <td>&nbsp;</td>
                <td align=middle>
                	<input onclick="" src="<%=path%>/images/dl.gif" type=image name="login">
                	
                </td>
                <td height=35><a href="<%=path%>/logon/userreg_addUI.action"><img border=0 src="<%=path%>/images/zc.gif" width=56 height=19></a>
                </td>
              </tr>
            </tbody>
             <% }else{%>
		      你好 <c:out value="${sessionScope.frontuser.username}" />&nbsp;
		      |&nbsp;<a href="<%=path%>/front/user_main.action" title="">个人中心</a>
		      |&nbsp;<a href="<%=path%>/logon/logout.action" title="">退出 </a>
		     <% } %>
            
          </table></td>
        <td width=9><img 
      src="<%=path%>/images/U1151P352T1D34927F17DT20060419172557.gif" 
      width=9 height=186></td>
        <td bgcolor=#ebf8e7 width=322 align=middle><table border=0 cellspacing=0 cellpadding=0 width=300>
            <tbody>
              <tr>
                <td height=30 align=middle><b 
            style="COLOR: #274402; FONT-SIZE: 14px">模拟志愿填报系统使用说明</b></td>
              </tr>
              <tr>
                <td class=l18>　　<span 
            class=style1>特别声明：招生考试院模拟志愿填报系统结果仅供参考，非做正式填报之用。</span></td>
              </tr>
              <tr>
                <td class=l18><font 
            color=#274402>　　为帮助高考生和家长填报志愿，招生考试院特别推出模拟志愿填报系统，模拟志愿填报真实过程，主要根据考生分数、排名、兴趣推荐合适的院校和专业 </font></td>
              </tr>
            </tbody>
          </table></td>
        <td width=8></td>
      </tr>
    </tbody>
  </table>
  </s:form>
  
  <jsp:include page="/foot.jsp"/>
</center>
	<script type="text/javascript" src="<%=path%>/script/jquery.validate-1.3.2.js"></script>
	 <script type="text/javascript" src="<%=path%>/script/jquery.validate.person.js"></script>
	 <script type="text/javascript" src="<%=path%>/script/jquery.validate.message_cn.js"></script>
	<script type="text/javascript">
		function newverifypic(){  //单击更新验证码
			//alert("clicked");
			$("#createcheckcode").attr("src","<%=path%>/logon/rand.action?"+Math.random()); 
		}
		$ (document).ready (function() {
			    $ ("#logon").validate ({
			        rules: {
			            
			            'loginusername': {
			    			required:true,
			    			maxlength:30
			            },
			            'loinpassword': {
			    			required:true,
			    			maxlength:30
			            },
			            'checkcode':{
			                required:true,
			                maxlength:5
			            }
			           
			        }
			    });
	
			});
		
	 
	</script>
	<script type="text/javascript" event="onkeydown" for="document">
	<!--
		if(event.keyCode == 13){
			document.all('login').click();
			}
	-->
	</script>
</body>
</html>
